import React from 'react';
import { Table } from 'antd';
import { StateType } from '@/models/SsqDataList';

interface IProp {
  dataSource: StateType[];
}

const SsqDataList: React.FC<IProp> = ({ dataSource }) => {

  const columns = [
    {
      key: 'code',
      dataIndex: 'code',
      title: '期号',
    },
    {
      key: 'date',
      dataIndex: 'date',
      title: '开奖日期',
    },
    {
      key: 'red1',
      dataIndex: 'red1',
      title: '红球1',
    },
    {
      key: 'red2',
      dataIndex: 'red2',
      title: '红球2',
    },
    {
      key: 'red3',
      dataIndex: 'red3',
      title: '红球3',
    },
    {
      key: 'red4',
      dataIndex: 'red4',
      title: '红球4',
    },
    {
      key: 'red5',
      dataIndex: 'red5',
      title: '红球5',
    },
    {
      key: 'red6',
      dataIndex: 'red6',
      title: '红球6',
    },
    {
      key: 'blue',
      dataIndex: 'blue',
      title: '蓝球',
    },
  ];
  return (
    <Table
      rowKey={record => record.code}
      columns={columns}
      dataSource={dataSource}
    />
  );
};

export default SsqDataList;
